package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.quest.EmployeeQueryObject;
import cn.wolfcode.result.PageResult;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Set;

public interface IEmployeeService {
    void deleteById(Long id);

    Employee selectById(Long id);

    void insert(Employee emp);

    Employee get(Long id);

    List<Employee> selectAll();

    void update(Employee emp);

    //添加新权限
    void insertRole(Employee employee,Long[] ids);

    //将权限中间表中原有权限删除并添加新权限
    void updateRole(Employee employee,Long[] ids);

    PageInfo<Employee> query(EmployeeQueryObject qo);

    void updatePwd(Long id, String newPassword);

    void batchDelect(Long[] ids);
     /*
           通过用户名查找对象
      */
    Employee QueryByName(String name);
    /*
         文件的导出功能
     */
    Workbook exportXls();
     /*
          文件的导入的功能
      */
    void importXls(MultipartFile file) throws IOException;
    /*
         更改用户的状态,禁用账号
     */
    void updataStatus(Long id, boolean status);

    List<Employee> selectByIds(Set<Long> ids);
    //销售人员的查询下拉框,只查询有Market角色或者Market_Manager角色的员工
    List<Employee> selRolesBySn(String...sn);
}
